<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <style>
        .div {
            color: red;
        }

        .gf {
            color: blue;
        }
    </style>
</head>
<body>
<div class="div">helloworld
    <button class="div gf" onclick="func()">按钮</button>  <!-- class定义多个类属性的值，onclick定义点击事件,调用函数-->
</div>

<script>
    let a = 10;

    function func() {
        document.write(a)
    };

</script>
</body>
</html>